<?php

namespace App\Modules\Apicrzs\Http\Controllers\Intake;

use App\Modules\Apicrzs\Http\Controllers\BaseApicrzsController;
use App\Modules\Apicrzs\Services\Water\DeviceWarrantyService;
use Illuminate\Http\Request;

class DeviceWarrantyController extends BaseApicrzsController
{
    public function __construct(DeviceWarrantyService $service)
    {
        $this->service = $service;
    }
    public function createWarranty(Request $request)
    {
        $result = $this->service->createWarranty($request->all());
        if ($result){
            return $this->sendApiSuccess($result, $this->service->getError());
        }else{
            return $this->sendApiError($this->service->getError());
        }
    }
}
